package cmd

import (
	"fmt"
	"github.com/spf13/cobra"
	"runtime"
	"wdhcr-jvm-cli/utils"
)

var listRemoteCmd = &cobra.Command{
	Use:   "ls-r",
	Short: "View the installable version of the remote warehouse",
	Run: func(cmd *cobra.Command, args []string) {
		listRemote()
	},
}

func init() {
	rootCmd.AddCommand(listRemoteCmd)
}

func listRemote() {
	remoteJdkVersion := utils.GetRemoteJdkVersion(runtime.GOOS, runtime.GOARCH)
	for key, _ := range remoteJdkVersion {
		fmt.Println(key)
	}
}
